package cn.humaohua.study.yanmo_design_pattern.ch13.v4;

import java.util.ArrayList;
import java.util.List;

// 菜单（由客户所点菜组成）
public class MenuCommand implements Command {

    private List<Command> cmds = new ArrayList<Command>();
    private int tableNum;

    @Override
    public int getTableNum() {
        return tableNum;
    }

    public void addCommand(Command cmd) {
        this.cmds.add(cmd);
    }

    public List<Command> getCmds() {
        return this.cmds;
    }

    @Override
    public void execute() {
        CommandQueue.addMenu(this);
    }

}
